/**
Autor:
*/
#ifndef TST_H_INCLUDED
#define TST_H_INCLUDED
#include "tabeladeSimbolos.h"
#include "listaPalavras.h"

class NoTST{
    public:
        char caractere;
        Palavra *chave;
        NoTST * filhos[3];
        NoTST();
        ~NoTST();
};

class TST{
    private:
        NoTST * raiz;
        NoTST* insere(NoTST* raiz, char* pstr, int docto, int i);
        void imprimirEmOrdem(NoTST * raiz, FILE* saida);
        NoTST* busca(NoTST* raiz, char* pstr, int i);
    public:
        TST();
        TabeladeSimbolos * tabela;
        bool insere(char* pstr, int docto);
        void emOrdem(FILE* saida);
        NoTST* busca(char* pstr);

        ~TST();
};
#endif //TST_H_INCLUDED
